feat(devin): add subagents adapter (.devin/agents/{name}/AGENT.md) - #1902
Merged
Conversation
Devin Local custom subagent profiles are AGENT.md files in named directories: project .devin/agents/<name>/AGENT.md and global ~/.config/devin/agents/<name>/AGENT.md. The directory name is the profile id. Frontmatter maps name/description plus a devin section (model, allowed-tools, permissions, max-nesting). Closes #1891 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Owner
Author
|
@dyoshikawa Thank you! |
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the subagents part of #1891: a native Devin Local custom subagent adapter.
Devin Local discovers custom subagent profiles as
AGENT.mdfiles in a directory-per-agent layout, where the directory name is the profile id:.devin/agents/<name>/AGENT.md~/.config/devin/agents/<name>/AGENT.mdThe adapter maps the rulesync
name/descriptionto top-level frontmatter and packs the Devin-specific fields (model,allowed-tools,permissionswithallow/deny/ask,max-nesting) into adevin:section, round-tripping on import.Evidence (verified upstream doc): https://docs.devin.ai/cli/subagents
Changes
src/constants/devin-paths.ts: addDEVIN_AGENTS_DIR_PATH(.devin/agents) andDEVIN_GLOBAL_AGENTS_DIR_PATH(.config/devin/agents, resolved under the home root in global mode — note this is NOT.devin/agents/under home).src/features/subagents/devin-subagent.ts: newDevinSubagentadapter (modeled onfactorydroid-subagent.ts+ the directory-per-agent layout fromdeepagents-subagent.ts).src/features/subagents/devin-subagent.test.ts: unit tests (paths, fromFile, fromRulesyncSubagent, toRulesyncSubagent, forDeletion, targeting, Devin-specific fields, global mode).src/features/subagents/subagents-processor.ts: wireDevinSubagentinto the factory map and tool-target tuple. ThefilePatternis*/AGENT.mdso the directory-per-agent layout is discovered (the flat agents root is not scanned).src/features/subagents/subagents-processor.test.ts: adddevinto the expected target lists.src/cli/commands/gitignore-entries.ts+.gitignore: add**/.devin/agents/(project; the global~/.config/devin/agents/lives under home and is not gitignored at the project level).src/e2e/e2e-subagents.spec.ts: add Devin happy-path cases to the generate, orphan-deletion, import, and global-mode matrices.README.md,docs/reference/supported-tools.md,docs/reference/file-formats.md(+ auto-syncedskills/rulesync/): flip the Devin subagents cell to ✅ and document the format/frontmatter.Notable deviations from the precedent
.devin/agents/<name>/AGENT.md(not flat<name>.md). The subagent name is derived from the rulesync file name on generation and from the parent directory on import.~/.config/devin/agents/rather than.devin/agents/under the home directory, sogetSettablePaths({ global })returns a distinct relative dir for global vs project.Deferred: permissions
The permissions part of the issue is intentionally deferred, matching the issue's own gating ("Evaluate a
devin-permissions.tsadapter once the persistent permissions config file/path is confirmed"). Devin documents only the runtime "Always Allow" grant UX, with no confirmed static on-disk permissions config file/path. Once an official persistent permissions file/path is documented, adevin-permissions.tsadapter can follow up.Closes #1891is appropriate since the actionable scope (subagents) is delivered and the permissions piece is blocked on an unmet upstream precondition.Verification
pnpm cicheckis fully green (code + content): 270 test files / 6467 tests passing, formatting/lint/typecheck clean, cspell and secretlint clean, skills/rulesync docs in sync.Closes #1891
🤖 Generated with Claude Code